package com.zs.toolbox.web2j.system.core.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.zs.toolbox.web2j.common.domain.WtBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author eric.zhang
 * @since 2018-10-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_post_comment")
@ApiModel(value = "WtPostCommentEntity对象", description = "")
public class WtPostCommentEntity extends WtBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "评论ID")
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Long commentId;

    @ApiModelProperty(value = "评论主题")
    @TableField("comment_post_id")
    private Long commentPostId;

    @ApiModelProperty(value = "评论内容")
    @TableField("comment_content")
    private String commentContent;

    @ApiModelProperty(value = "是否允许评论")
    @TableField("comment_approved")
    private String commentApproved;

    @ApiModelProperty(value = "评论类型")
    @TableField("comment_type")
    private String commentType;

    @ApiModelProperty(value = "上级评论")
    @TableField("comment_parent")
    private Long commentParent;

    @ApiModelProperty(value = "评论人")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "创建人")
@TableField(value = "create_user", fill = FieldFill.INSERT)
    private Long createUser;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", update = "now()", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "是否有效 1有效    2无效")
    @TableField("delete_status")
    @TableLogic
    private Integer deleteStatus;


}
